package com.mojo.concurrent.customerproducer;

/**
 * 生产消费测试
 * 1.生产和消费要针对同一资源
 *
 * @author <a href="mailto:mojo_jj@163.com">Mojo</a>
 */
public class CustomerProducerTest {
    public static void main(String[] args) {
        Resource resource = new Resource();
        new Thread(new Customer(resource), "消费者1").start();
        new Thread(new Customer(resource), "消费者2").start();
        new Thread(new Producer(resource), "生产者1").start();
        new Thread(new Producer(resource), "生产者2").start();
    }
}
